import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/fashion-comment/index'  //时尚评点列表页
import FcDetail from '@/components/fashion-comment/fc-detail' //时尚评点详情页
import FcComment from '@/components/fashion-comment/comment' //时尚评点评论页
import FcGather from '@/components/gather-fashion/gather' //聚划算列表页
import GatherDetail from '@/components/gather-fashion/gather-detail' //聚划算详情页
import MemberResgiter from '@/components/menberegister/register' //聚划算加入会员页
import MemberCenter from '@/components/member-center/member-center' //会员中心
import memberMinusTimes from '@/components/member-center/member-minus-times' //会员中心
import MemberCenterRedPackage from '@/components/member-center/member-center-redpackage' //红包中心
import PurchaseHistory from '@/components/member-center/purchase-history' //消费记录 
import Activities from '@/components/activities/activities' //我参加的活动
import Main from '@/components/main/main' //主页
import ActivityDetail from '@/components/main/actitity-detail' //主页活动详情   
import MaterialComment from '@/components/materialComment/materialComment' //款号 评论

Vue.use(Router)

export default new Router({
  routes: [
  	{
		path: '/',
		redirect: '/main'
	},
     {
      path: '/main',
      name: 'main',
      component: Main, //时尚评点列表页
      meta: {
      	keepAlive: true, // 需要被缓存
      	title:'tony时尚科技生活馆'
   	  }
    },
    {
      path: '/main/activity-detail',
      name: 'activityDetail',
      component: ActivityDetail, //主页活动详情
      meta: {
   	  }
    },
    {
      path: '/fashion/:openId/:type',
      name: 'index',
      component: Index, //时尚评点列表页
      meta: {
      	keepAlive: true // 需要被缓存
   	  }
    },
    {
    	path:'/fashion/fc-detail/:id/:oid',
    	name:'fc-detail',
    	component:FcDetail, //时尚评点详情页
    	meta: {
      	keepAlive: false // 不需要被缓存
   	  }
    },
    {
    	path:'/fc-comment/:id',
    	name:'fc-comment',
    	component:FcComment,//评论页面
    	meta: {
      	keepAlive: false // 不需要被缓存
   	  }
    },
    {
    	path:'/fc-gather',
    	name:'fc-gather',
    	component:FcGather, //聚划算列表页
    	meta: {
      	keepAlive: false // 不需要被缓存
   	  }
    },
    {
    	path:'/gather-detail/:id/:oid',
    	name:'gather-detail',
    	component:GatherDetail,//聚划算详情页
    	meta: {
      	keepAlive: false // 不需要被缓存
   	  }
    },
    {
    	path:'/register/:openId',
    	name:'register',
    	component:MemberResgiter,//注册页面
    	meta: {
      	keepAlive: false, // 不需要被缓存
      	title:'加入会员'
   	  }
    },
    {
    	path:'/member-center',
    	name:'member-center',
    	component:MemberCenter,//会员中心
    	meta: {
      	keepAlive: false // 不需要被缓存
   	  }
    },
    {
    	path:'/member-minus-times',
    	name:'member-minus-times',
    	component:memberMinusTimes,//会员消费次数
    	meta: {
      	keepAlive: false // 不需要被缓存
   	  }
    },
    {
    	path:'/member-center/redpackage',
    	name:'memberCenterRedpackage',
    	component:MemberCenterRedPackage,//红包记录
    	meta: {
      	keepAlive: false // 不需要被缓存
   	  }
    },
    {
    	path:'/member-center/purchase-history',
    	name:'PurchaseHistory',
    	component:PurchaseHistory,//消费记录
    	meta: {
      	keepAlive: false // 不需要被缓存
   	  }
    },
    {
    	path:'/activities/:openId',
    	name:'activities',
    	component:Activities,//活动中心
    	meta: {
      	keepAlive: false, // 不需要被缓存
      	title:'活动中心'
   	  }
    },
    {
    	path:'/plm/material',
    	name:'material',
    	component:MaterialComment,//款号 评论
    	meta: {
      	keepAlive: false, // 不需要被缓存
      	title:'款号评价'
   	  }
    }
  ]
})
